<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBrokersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('brokers', function (Blueprint $table) {
          $table->id();
          $table->string('name')->comment('经纪人名称');
          $table->string('avatar')->comment('经纪人头像');
          $table->string('phone')->comment('经纪人电话');
          $table->integer('number')->default(0)->comment('房产数量');
          $table->integer('sell_number')->default(0)->comment('售出数量');
          $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('brokers');
    }
}
